package com.bishe.demo.modules.hotel.hotelFacilityAndService.dao;

import com.bishe.demo.modules.hotel.hotelFacilityAndService.entity.FacilityHotelImage;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface FacilityHotelImageDao {
    @Insert("insert into hotel_facility_hotel_image values(null,#{facilityId},#{hotelImageId})")
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    void insertFacilityHotelImage(FacilityHotelImage facilityHotelImage);

    @Delete("delete from hotel_facility_hotel_image where hotel_image_id=#{imageId}")
    void deleteFacilityImageByImageId(int imageId);
}
